﻿/**********************************************************************
 * @file   OperFESensor.h
 * @brief  FE传感器操作器 - 创建，修改FE传感器的数据
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-01-08
 *********************************************************************/
#ifndef _OperatorsSensor_H
#define _OperatorsSensor_H

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"

namespace ModelOper
{
    /**
     * @brief FE传感器操作器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-10-23
     */
    class OperFESensor :public Core::FITKActionOperator
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Operators Create FESensor object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-10-23
         */
        explicit OperFESensor() = default;
        /**
         * @brief Destroy the Operators Create FESensor object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-10-23
         */
        virtual ~OperFESensor() = default;
        /**
         * @brief 执行
         * @return true 成功
         * @return false 失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-10-23
         */
        virtual bool execGUI() override;
        /**
         * @brief 执行结果处理
         * @return true 成功
         * @return false 失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-10-23
         */
        virtual bool execProfession() override;

    protected:
        bool pickDataOper();
        bool editSensorOper();
        void pickDataFinished();
        void createSensorOper();
    };

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionCreateFESensor, OperFESensor);
    Register2FITKOperatorRepo(actionEditFESensor, OperFESensor);
}

#endif